Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add System.Net.Http ServerCertificateCustomValidationCallback ILLink Suppression #58456

Conversation

mdh1418
Copy link
Member

@mdh1418 mdh1418 commented Aug 31, 2021

Fixes #57537

During PR #57555, it was unclear what the correct suppression syntax would be for a return type of Func<HttpRequestMessage, X509Certificate2?, X509Chain?, SslPolicyErrors, bool>. With some helpful switches to generate the right warning suppression syntax via --generate-warning-suppressions xml in RuntimePackILLinkArgs, this PR adds the correct warning suppression.

@mdh1418 mdh1418 added this to the 6.0.0 milestone Aug 31, 2021
@mdh1418 mdh1418 requested a review from steveisok August 31, 2021 18:49
@ghost
Copy link

ghost commented Aug 31, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #57537

During #57555, it was unclear what the correct suppression syntax would be for a return type of Func<HttpRequestMessage, X509Certificate2?, X509Chain?, SslPolicyErrors, bool>. With some helpful switches to generate the right warning suppression syntax via --generate-warning-suppressions xml in RuntimePackILLinkArgs, this PR adds the correct warning suppression.

Author: mdh1418
Assignees: -
Labels:

area-System.Net

Milestone: 6.0.0

@steveisok steveisok changed the title [Android][libraries] Add System.Net.Http ServerCertificateCustomValidationCallback ILLink Suppression Add System.Net.Http ServerCertificateCustomValidationCallback ILLink Suppression Aug 31, 2021
@steveisok
Copy link
Member

@jonathanpeppers @rolfbjarne FYI

@stephentoub
Copy link
Member

cc: @eerhardt

@mdh1418
Copy link
Member Author

mdh1418 commented Sep 1, 2021

/backport to release/6.0

@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2021

Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1190872599

@@ -141,6 +141,18 @@
<property name="Target">M:System.Net.Http.HttpClientHandler.SetMaxAutomaticRedirections(System.Int32)</property>
<property name="Justification">The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app.</property>
</attribute>
<attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@steveisok @mdh1418 - this is a pretty massive xml suppression file. It may make sense to make it AnyMobile specific and only use it when building for AnyMobile targets. That way we don't inadvertently suppress warnings when we shouldn't be.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mdh1418 Can you do a follow up PR w/ Eric's suggestion?

@karelz karelz modified the milestones: 6.0.0, 7.0.0 Sep 3, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Oct 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[net6.0-android] HttpClient.ServerCertificateCustomValidationCallback throws 'Arg_PlatformNotSupported'
5 participants